package com.cskaoyan.mapper;

import com.cskaoyan.bean.MallCoupon;
import com.cskaoyan.bean.MallCouponExample;
import com.cskaoyan.bean.MallCouponUser;
import com.cskaoyan.model.vo.promote_ad.MyListVo;
import com.cskaoyan.model.vo.wxhomeindex.WxNoCoupon;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MallCouponMapper {

    List<MallCoupon> selectNoCouponById(Integer id);

    long countByExample(MallCouponExample example);

    int deleteByExample(MallCouponExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MallCoupon record);

    int insertSelective(MallCoupon record);

    List<MallCoupon> selectByExample(MallCouponExample example);

    MallCoupon selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MallCoupon record, @Param("example") MallCouponExample example);

    int updateByExample(@Param("record") MallCoupon record, @Param("example") MallCouponExample example);

    int updateByPrimaryKeySelective(MallCoupon record);

    int updateByPrimaryKey(MallCoupon record);

    //select方法
    List<MallCoupon> selectList();

    //insert 方法
    Integer insertSimpleMallCoupon(@Param("mallCoupon") MallCoupon mallCoupon);

    //update 方法
    Integer updateMallCoupon(@Param("mallCoupon") MallCoupon mallCoupon);

    //delete方法
    Integer deleteMallCoupon(@Param("mallCoupon") MallCoupon mallCoupon);

    //连表查询 mylist
    List<MyListVo> selectWxMyList();

    List<MallCoupon> wxSelectExchange(@Param("code") String code);

    int wxSelectUser(@Param("id") Integer id, @Param("userId") Integer userId);

    int selectReceive(@Param("couponId") Integer couponId, @Param("userid") Integer userid);

    List<MallCoupon> read(@Param("id") Integer id);

    List<MallCouponUser> listUser(@Param("couponId") Integer couponId);

    List<MyListVo> selectConectMyList(Integer userId);

    //receive 接口的插入 语句
    int insertOne(@Param("couponId") Integer couponId, @Param("userid") Integer userid);
}
